package com.geek.factory.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.geek.factory.dto.DeviceRepairLogDTO;
import com.geek.factory.entity.DeviceRepairLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DeviceRepairLogMapper extends BaseMapper<DeviceRepairLog> {

    @Select("SELECT log.*, pl.line_name AS product_line_name " +
            "FROM device_repair_log log " +
            "LEFT JOIN product_line pl ON log.product_line_id = pl.id")
    List<DeviceRepairLogDTO> selectWithLineName();



}
